package com.sc.nft.entity.vo.secondEquityProp;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sc.nft.enums.OrderStatusEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class EquityPropWaitPayOrderDetailsVO {

    @ApiModelProperty("订单id")
    private Long orderId;

    @ApiModelProperty("权益道具id")
    private Long equityPropsId;

    @ApiModelProperty("交易金额/代付款金额")
    private String buyPrice;

    @ApiModelProperty("过期时间戳")
    private Long expirationTimeStamp;

    @ApiModelProperty("当前时间戳")
    private Long nowTimeStamp;

    @ApiModelProperty("权益道具")
    private String firstTitle;

    @ApiModelProperty("图片")
    private String creationContent;

    @ApiModelProperty("订单状态 CLOSE:关闭 WAIT_PAY:待支付 PAYMENT:已付款")
    private OrderStatusEnum status;

    @ApiModelProperty("订单编号")
    private String orderNo;

    @ApiModelProperty("买家昵称")
    private String buyUserNickName;

    @ApiModelProperty("卖家昵称")
    private String salesUserNickName;

    @ApiModelProperty("下单时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    public void setBuyPrice(BigDecimal buyPrice) {
        this.buyPrice = buyPrice.setScale(2,BigDecimal.ROUND_DOWN).toPlainString();
    }
}
